<?php
	//1.登录
	//mysql_connect("服务器地址","用户名","密码");返回值为连接的对象
	header("Content-type:text/html;charset=utf-8");
	// header("Content-type:text/html;charset=utf-8");
	$conn = mysql_connect("localhost","root","root");
	if($conn){
		echo "连接成功";
		//2.选择库
		mysql_select_db("2107");
		//3.操作数据库
		//musql_query(sql语句,连接对象);
		mysql_query("insert into student values(1,'小明',18,'1998-5-30')",$conn);
		
		//4.关闭连接对象,突出登录
		mysql_close($conn);
	}
?>